/*
 * web-view 
 */
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

class WebViewState extends StatelessWidget {
  final value;
  WebViewState({Key key, @required this.value}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: PreferredSize(
          preferredSize: Size.fromHeight(60.0), // here the desired height
          child: AppBar(
            centerTitle: true,
            title: Text(value['name']),
          )),
      body: WebView(
        initialUrl: value['http'],
        //JS执行模式 是否允许JS执行
        javascriptMode: JavascriptMode.unrestricted,
      ),
    );
  }
}
